home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / cug231 / blocks.st < prev    next >
Text File  |  1987-06-17  |  640b  |  25 lines

  1. Class Main
  2. [
  3.     main
  4.         (2 < 3) ifTrue: ['correct-1' print].
  5.         ((2 < 3) ifTrue: ['correct-2']) print.
  6.         [:x | x print] value: 'correct-3' .
  7.         ((2 < 3) or: [3 < 4]) ifTrue: ['correct-4' print].
  8.         ((2 > 3) or: [3 < 4]) ifTrue: ['correct-5' print].
  9.         ((2 < 3) and: [3 < 4]) ifTrue: ['correct-6' print].
  10.         ((2 > 3) and: [3 < 4]) ifFalse: ['correct-7' print].
  11.         self test1 print
  12. |
  13.     test1
  14.         self test2: [^ 'correct-8'].
  15.         'should not print' print
  16. |
  17.     test2: aBlock
  18.         self test3: aBlock.
  19.         'should not print' print
  20. |
  21.     test3: bBlock
  22.         bBlock value.
  23.         'should not print' print
  24. ]
  25.